package com.maimao.model.info.input;

import lombok.*;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 从购物车提交到确认订单 需自动领取可用优惠券并查询可用优惠券
 *
 * @author MaoLin Wang
 * @date 2021/1/16 10:50 上午
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Setter
@Getter
public class ConfirmCoupon implements Serializable {


    private static final long serialVersionUID = -2379985274292362906L;
    /**
     * 店铺订单总额 或 订单总额
     */
    @NotNull(message = "订单总额为空")
    private BigDecimal limit;

    @NotNull(message = "用户为空")
    @Min(value = 1, message = "用户非法")
    private Long userId;

    /**
     * 店铺id
     */
    private Long shopId;

    /**
     * 商品 id
     */
    private List<Long> goodsId;

    /**
     * 专区id
     */
    private List<Integer> specAreaIds;


    @Override
    public String toString() {
        return "ConfirmCoupon{" +
                "limit=" + limit +
                ", userId=" + userId +
                ", shopId=" + shopId +
                ", goodsId=" + goodsId +
                ", specAreaIds=" + specAreaIds +
                '}';
    }
}
